/**************************************************************************
 *                                                                        *
 *         Copyright (c) 2007 by Sunplus mMedia Inc.                      *
 *                                                                        *
 *  This software is copyrighted by and is the property of Sunplus        *
 *  mMedia Inc. All rights are reserved by Sunplus mMedia Inc.  This      *
 *  software may only be used in accordance with the corresponding        *
 *  license agreement. Any unauthorized use, duplication, distribution,   *
 *  or disclosure of this software is expressly forbidden.                *
 *                                                                        *
 *  This Copyright notice MUST not be removed or modified without prior   *
 *  written consent of Sunplus mMedia Inc.                                *
 *                                                                        *
 *  Sunplus mMedia Inc. reserves the right to modify this software        *
 *  without notice.                                                       *
 *                                                                        *
 *  Sunplus mMedia Inc.                                                   *
 *  19-1, Innovation First Road, Science-Based Industrial Park,           *
 *  Hsin-Chu, Taiwan, R.O.C.                                              *
 *                                                                        *
 **************************************************************************/

#ifndef __I_CAT_H__
#define __I_CAT_H__
//------------------------------------------------------------------------------
//Constant
//------------------------------------------------------------------------------
#define ICAT_REQUEST	0xb0

#define ICAT_CAP_FLOW_MODE	0
#define ICAT_RAW_FLOW_MODE	1
#define ICAT_RAW_ONLY_MODE	2
#define ICAT_JPG_UPLD_MODE  4

//selected job from AP
#define ICAT_JOB_WAIT_AP	0
#define ICAT_JOB_DO			1
#define ICAT_JOB_SKIP		2
#define ICAT_JOB_DONE		3
#define ICAT_JOB_STOP		4 	//stop all bulk ....


//------------------------------------------------------------------------------
//External Link
//------------------------------------------------------------------------------
extern xdata UINT8 iCatFlowMode;
extern xdata UINT8 iCatNextJob;

extern xdata UINT32 iCatRawFileSize; // do nothing if zero

extern xdata UINT16 iCatResFileNum;
extern xdata UINT16 iCatResFileId;
extern xdata UINT32 iCatResFileSize;

extern xdata UINT32 iCatBulkSize;

//------------------------------------------------------------------------------
//Function Prototype
//------------------------------------------------------------------------------
typedef void ( *Stub )( UINT16, UINT8 * );
void ICat_VndCmdStub( UINT16 idx, UINT16 val, UINT16 bufSz, UINT8  *buf );
void ICat_VndCmdStubDPC( UINT16 idx, UINT16 val, UINT16 bufSz, UINT8  *buf );
UINT8 ICat_GetNextJob();
UINT8 ICat_DownLoadRes(UINT16 idx);
UINT8 ICat_UpLoadRes(void);
UINT8 iCat_IsDPCCmd(UINT16 idx);

#endif /*__VNDREQ_H__*/
